// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
import { CreateDeviceParams, DeciceResult, DeviceParams } from './model/deviceModel';
/** 获取设备 GET  */
export async function getDeviceList(params: DeviceParams, options?: { [key: string]: any }) {
  return request<DeciceResult>(API_URL + '/superlink/api/devices/list', {
    method: 'GET',
    params,
    ...(options || {}),
  });
}
/** 添加设备 POST  */
export async function createDevice(data: CreateDeviceParams) {
  return request(API_URL + '/superlink/api/devices/create', {
    method: 'POST',
    data,
  });
}
/** 删除设备 DELETE  */
export async function delDevice(id: string) {
  return request(API_URL + '/superlink/api/devices/delete/' + id, {
    method: 'DELETE',
  });
}
